home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12191 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: web.cae.ca!usenet
  2. From: fraserh@cae.ca (Fraser Hutchinson)
  3. Newsgroups: comp.lang.c,comp.lang.c++
  4. Subject: Re: Why is C faster than FORTRAN?
  5. Date: 18 Mar 1996 19:30:13 GMT
  6. Organization: CAE Electronics Ltd.
  7. Message-ID: <4ikdk5$rck@web.cae.ca>
  8. References: <4hv2ho$d8t@news.interpath.net> <4i2c5e$t70@kiwi.futuris.net> <4i4poj$j7e@thorn.cc.usm.edu> <4i74inINNnfj@keats.ugrad.cs.ubc.ca>
  9. NNTP-Posting-Host: pch63.cae.ca
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=US-ASCII
  12. X-Newsreader: WinVN 0.99.7
  13.  
  14. In article <4i74inINNnfj@keats.ugrad.cs.ubc.ca>, c2a192@ugrad.cs.ubc.ca says...
  15. >
  16. >In article <4i4poj$j7e@thorn.cc.usm.edu>,
  17. >Peter Sakalaukus <sakalauk@coam.usm.edu> wrote:
  18. >>I have two programs, FORTRAN and C. They both use the same algorithm to
  19. >>manipulate numeric data. The larger the data file though, the faster the
  20. >>C version is, (in relation to the FORTARN program). I am running on a UNIX
  21.  
  22. [snip]
  23.  
  24. >
  25. >>My question is: what is the reason that C is so much quicker? Is C normally
  26. >>faster than FORTRAN?
  27.  
  28. I would suspect that this is because Fortran routines have to be more general 
  29. in nature than C code, and thus incurs the overhead of generality.  A similar 
  30. case may be stated for the printf() set of routines which are considerably 
  31. slower than write()s.
  32.  
  33. Fraser
  34.  
  35.